package cn.demoncat.util.pay.unionpay.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import cn.demoncat.util.lang.constant.StatusConstant.Common;

/**
 * 支付宝配置
 * 
 * @author 延晓磊
 *
 * @since 2019年9月24日
 */
@Component
@ConfigurationProperties(prefix = "pay.unionpay")
public class UnionpayProperties {

	/**
	 * 部署环境：1 PROD，0 TEST
	 */
	private String status = Common.NO;
	/**
	 * 商户代码
	 */
	private String merId;
	/**
	 * 后端异步通知URL
	 * 
	 * 场景：支付/撤销/退款成功后，银联异步通知的地址，POST请求；收到后需在10秒内返回HTTP-200，未返回时银联会间隔重发5次
	 */
	private String backNotifyUrl;
	/**
	 * 前端异步通知URL
	 * 
	 * 场景：支付成功后，点击"返回商户"跳转的地址，POST请求
	 */
	private String frontNotifyUrl;
	/**
	 * 前端支付失败通知URL（为空时不跳转）
	 * 
	 * 场景：支付失败后，跳转的地址，仅跳转，不带交易信息
	 */
	private String frontFailNotifyUrl;
	/**
	 * 签名证书路径
	 */
	private String signCertPath = "D:/certs/acp_test_sign.pfx";
	/**
	 * 签名证书密码
	 * 
	 * TEST：000000
	 */
	private String signCertPassword = "000000";
	/**
	 * 加密证书路径
	 * 
	 * 商户开通对敏感信息加密的权限后，需要对卡号等进行加密
	 */
	private String encryptCertPath = "D:/certs/acp_test_enc.cer";
	/**
	 * 验签中级证书路径
	 */
	private String middleCertPath = "D:/certs/acp_test_middle.cer";
	/**
	 * 验签根证书路径
	 */
	private String rootCertPath = "D:/certs/acp_test_root.cer";

	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getMerId() {
		return merId;
	}
	public void setMerId(String merId) {
		this.merId = merId;
	}
	public String getBackNotifyUrl() {
		return backNotifyUrl;
	}
	public void setBackNotifyUrl(String backNotifyUrl) {
		this.backNotifyUrl = backNotifyUrl;
	}
	public String getFrontNotifyUrl() {
		return frontNotifyUrl;
	}
	public void setFrontNotifyUrl(String frontNotifyUrl) {
		this.frontNotifyUrl = frontNotifyUrl;
	}
	public String getSignCertPath() {
		return signCertPath;
	}
	public void setSignCertPath(String signCertPath) {
		this.signCertPath = signCertPath;
	}
	public String getSignCertPassword() {
		return signCertPassword;
	}
	public void setSignCertPassword(String signCertPassword) {
		this.signCertPassword = signCertPassword;
	}
	public String getEncryptCertPath() {
		return encryptCertPath;
	}
	public void setEncryptCertPath(String encryptCertPath) {
		this.encryptCertPath = encryptCertPath;
	}
	public String getMiddleCertPath() {
		return middleCertPath;
	}
	public void setMiddleCertPath(String middleCertPath) {
		this.middleCertPath = middleCertPath;
	}
	public String getRootCertPath() {
		return rootCertPath;
	}
	public void setRootCertPath(String rootCertPath) {
		this.rootCertPath = rootCertPath;
	}
	public String getFrontFailNotifyUrl() {
		return frontFailNotifyUrl;
	}
	public void setFrontFailNotifyUrl(String frontFailNotifyUrl) {
		this.frontFailNotifyUrl = frontFailNotifyUrl;
	}
 
}
